/**
	韩飞 描述模型信息
**/
function leave(obj){
	var spn=$(obj).parents("span");
	spn.html($(obj).val());
	spn.parent("div").css("padding","0px");

}
function dbclick(obj){
	var inp=$("<input type='text' name='singlecheck' size=23 onBlur='leave(this)' >");
	
	$(obj).html(inp.val($(obj).text()));
	$(obj).parents("div").css("padding-top","5px");
	inp.select();
	
}

//设置审批关联信息
function redirect(){
	doQueryMess(_c + "/settingM.action","","800","600");
}
//点击表 查询对应表的字段信息
function onselect(obj,tabeninfo,tabid,tabcninfo){
	$(".ondivjpg").bind("mouseout",function(){onmouseoverout(this);});
	$(".ondivjpg").children("span").css("font-weight","");
	$(".ondivjpg").removeClass("ondivjpg");
	$(obj).addClass("ondivjpg");
	$(obj).children("span").css("font-weight","bold");
	$(".ondivjpg").unbind("mouseout").removeAttr("onmouseout");
	
	//选择不同的表进行查询
	document.forms[0].tabcn.value = tabcninfo;
	document.forms[0].taben.value = tabeninfo;
	document.forms[0].submit();
}
function onmouseoverobj(obj){
	$(obj).addClass("ondivjpg");
	$(obj).children("span").css("font-weight","bold");
}
function onmouseoverout(obj){
	$(obj).removeClass("ondivjpg");
	$(obj).children("span").css("font-weight","");
}
//删除  或修改 字段信息
function doMainFUD(column,fieldtype,flag){
	if(flag=="upd"){
		doQueryMess(_c + "/modelM.action?operate=fupd&column="+column+"&fieldtype="+fieldtype+"&taben="+document.forms[0].taben.value,"","700","200");
	}else{
		if(confirm("你确定要删除此字段?")){
			document.forms[0].action = _c + "/modelM.action?colen="+fieldtype+"&operate=fdel&colid="+column+"&taben="+document.forms[0].taben.value;
			document.forms[0].submit();
		}
	}
}
// 修改表信息
function doMainTUD(tabeninfo){
	doQueryMess(_c + "/modelM.action?operate=tupd&taben="+tabeninfo,"","500","200");
}

